package engine;

import javax.swing.BorderFactory;
import javax.swing.JPanel;


public class SchedulerControlComponent extends JPanel{

	/**
	 * 
	 */
	private static final long serialVersionUID = 2828817250904194454L;
//	private JPanel controlPane;
	private SchedulerSlider speedSlider;
	private SchedulerStepperButton stepButton;
	
	public SchedulerControlComponent(AlternateStateThreadPoolExecutor pe) {
		super();
//		controlPane = new JPanel();
		setBorder(BorderFactory.createCompoundBorder(
                BorderFactory.createTitledBorder("Scheduler control"),
                BorderFactory.createEmptyBorder(5,5,5,5)));

		speedSlider = new SchedulerSlider();
		stepButton = new SchedulerStepperButton();
		speedSlider.addChangeListener(new SchedulerSliderListener(pe, stepButton));
//		controlPane.add(speedSlider);
//		controlPane.add(stepButton);
		this.add(speedSlider);
		this.add(stepButton);
	}
}
